<div class=" animated fadeInRight ecommerce">

    <div class="ibox ">
        <div class="ibox-title">
            <h5>
                <vc:i18n name="查询条件" namespace="reportPayFeeDetail"></vc:i18n>
            </h5>
            <div class="ibox-tools" style="top:10px;">
                <button type="button" class="btn btn-link btn-sm" style="margin-right:10px;"
                    v-on:click="_moreCondition()">{{reportPayFeeDetailInfo.moreCondition == true?'隐藏':'更多'}}
                </button>
            </div>
        </div>
        <div class="ibox-content">
            <div class="row">

                <div class="col-sm-2">
                    <div class="form-group input-group">
                        <input type="text" :placeholder="vc.i18n('请选择缴费开始时间','reportPayFeeDetail')" name="startTime"
                            v-model="reportPayFeeDetailInfo.conditions.startTime" class=" form-control startTime">
                    </div>
                </div>
                <div class="col-sm-2">
                    <div class="form-group input-group">
                        <input type="text" :placeholder="vc.i18n('请选择缴费结束时间','reportPayFeeDetail')" name="endTime"
                            v-model="reportPayFeeDetailInfo.conditions.endTime" class=" form-control endTime">
                    </div>
                </div>
                <div class="col-sm-2">
                    <div class="form-group">
                        <select class="form-control-md form-control input-s-sm inline"
                            v-model="reportPayFeeDetailInfo.conditions.primeRate">
                            <option selected value="">{{vc.i18n('请选择支付方式','reportPayFeeDetail')}}</option>
                            <option v-for="(item,index) in reportPayFeeDetailInfo.primeRates" :key="index"
                                :value="item.statusCd">{{item.name}}
                            </option>
                        </select>
                    </div>
                </div>
                <div class="col-sm-2">
                    <div class="form-group">
                        <select class="form-control-md form-control input-s-sm inline"
                            v-model="reportPayFeeDetailInfo.conditions.state">
                            <option selected value="">{{vc.i18n('请选择费用状态','reportPayFeeDetail')}}</option>
                            <option v-for="(item,index) in reportPayFeeDetailInfo.states" :key="index"
                                :value="item.statusCd">{{item.name}}
                            </option>
                        </select>
                    </div>
                </div>
                <div class="col-sm-2">
                    <div class="form-group">
                        <input type="text" :placeholder="vc.i18n('房屋编号或者车牌号','reportPayFeeDetail')"
                            class="form-control form-control-md"
                            v-model="reportPayFeeDetailInfo.conditions.payerObjName">
                    </div>
                </div>
                <div class="col-sm-2">
                    <button type="button" class="btn btn-primary btn-md" v-on:click="_queryMethod()">
                        <vc:i18n name="查询" namespace="reportPayFeeDetail"></vc:i18n>
                    </button>
                    <button type="button" class="btn btn-info btn-md" v-on:click="_resetMethod()"
                        style="margin-left: 20px;">
                        <i class="fa fa-repeat"></i>
                        <span>
                            <vc:i18n name="重置" namespace="reportPayFeeDetail"></vc:i18n>
                        </span>
                    </button>
                </div>
            </div>
            <div class="row" v-show="reportPayFeeDetailInfo.moreCondition == true">
                <div class="col-sm-2">
                    <div class="form-group">
                        <select class="form-control-md form-control input-s-sm inline"
                            v-model="reportPayFeeDetailInfo.conditions.feeTypeCd" @change="_selectConfig()">
                            <option selected value="">{{vc.i18n('请选择费用类型','reportPayFeeDetail')}}</option>
                            <option v-for="(item,index) in reportPayFeeDetailInfo.feeTypeCds" :key="index"
                                :value="item.statusCd">{{item.name}}
                            </option>
                        </select>
                    </div>
                </div>
                <div class="col-sm-2">
                    <div class="form-group">
                        <select class="form-control-md form-control input-s-sm inline"
                            v-model="reportPayFeeDetailInfo.conditions.configId">
                            <option selected value="">{{vc.i18n('请选择收费项','reportPayFeeDetail')}}</option>
                            <option v-for="(item,index) in reportPayFeeDetailInfo.feeConfigDtos" :key="index"
                                :value="item.configId">
                                {{item.feeName}}
                            </option>
                        </select>
                    </div>
                </div>

                <div class="col-sm-2">
                    <div class="form-group input-group">
                        <input type="text" :placeholder="vc.i18n('请选择收费开始时间','reportPayFeeDetail')"
                            v-model="reportPayFeeDetailInfo.conditions.feeStartTime" class=" form-control feeStartTime">
                    </div>
                </div>
                <div class="col-sm-2">
                    <div class="form-group input-group">
                        <input type="text" :placeholder="vc.i18n('请选择收费结束时间','reportPayFeeDetail')"
                            v-model="reportPayFeeDetailInfo.conditions.feeEndTime" class=" form-control feeEndTime">
                    </div>
                </div>
            </div>
            <div class="row" v-show="reportPayFeeDetailInfo.moreCondition == true">
                <div class="col-sm-2" v-if="reportPayFeeDetailInfo.communitys.length>1">
                    <select class="form-control-md form-control input-s-sm inline"
                        v-model="reportPayFeeDetailInfo.conditions.communityId" @change="_changCommunity()">
                        <option disabled selected value="">{{vc.i18n('请选择小区','reportFeeSummary')}}</option>
                        <option v-for="(item,index) in reportPayFeeDetailInfo.communitys" :key="index"
                            v-bind:value="item.communityId">
                            {{item.name}}
                        </option>
                    </select>
                </div>
            </div>
        </div>

    </div>

    <div class="ibox">
        <div class="ibox-title">
            <h5>
                <vc:i18n name="缴费明细表" namespace="reportPayFeeDetail"></vc:i18n>
            </h5>
            <span class="fa fa-info-circle popover-show" style="cursor: pointer;" data-content="所有房屋缴费记录明细"></span>
            <div class="ibox-tools" style="top:10px;">
                <button type="button" class="btn btn-primary btn-sm" v-on:click="_exportFee()">
                    <vc:i18n name="导出" namespace="reportPayFeeDetail"></vc:i18n>
                </button>
            </div>
        </div>
        <div class="ibox-content">
            <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
                <thead>
                    <tr>
                        <th class="text-center">
                            <vc:i18n name="订单号" namespace="reportPayFeeDetail"></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name="房号/业主" namespace="reportPayFeeDetail"></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name="费用类型>费用项" namespace="reportPayFeeDetail"></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name="费用状态" namespace="reportPayFeeDetail"></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name="支付方式" namespace="reportPayFeeDetail"></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name="缴费时间段" namespace="reportPayFeeDetail"></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name="缴费时间" namespace="reportPayFeeDetail"></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name="收银员" namespace="reportPayFeeDetail"></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name="应缴/应收金额(元)" namespace="reportPayFeeDetail"></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name="实收金额(元)" namespace="reportPayFeeDetail"></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name="账户抵扣(元)" namespace="reportPayFeeDetail"></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name="优惠/减免金额(元)" namespace="reportPayFeeDetail"></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name="赠送金额(元)" namespace="reportPayFeeDetail"></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name="滞纳金(元)" namespace="reportPayFeeDetail"></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name="面积(平方米)" namespace="reportPayFeeDetail"></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name="车位" namespace="reportPayFeeDetail"></vc:i18n>
                        </th>
                        <th class="text-center" style="max-width: 200px;">
                            <vc:i18n name="说明" namespace="reportPayFeeDetail"></vc:i18n>
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <tr v-for="(fee,index) in reportPayFeeDetailInfo.fees">
                        <td class="text-center">{{fee.oId?fee.oId:'-'}}</td>
                        <td class="text-center">
                            <div style="width: 110px;">
                                {{fee.payerObjName}}/{{fee.ownerName}}
                            </div>
                        </td>
                        <td class="text-center">{{fee.feeTypeCdName}}>{{fee.feeName}}</td>
                        <td class="text-center">{{fee.stateName}}</td>
                        <td class="text-center">{{fee.primeRate}}</td>
                        <td class="text-center">
                            <div style="width: 110px;">{{vc.dateFormat(fee.startTime)}}</br>
                                ~</br>
                                <span v-if="fee.startTime >= fee.endTime">{{vc.dateFormat(fee.endTime)}}</span>
                                <span v-else>
                                    {{vc.dateSubOneDay(vc.dateFormat(fee.startTime),vc.dateFormat(fee.endTime),fee.feeFlag)}}
                                </span>
                            </div>
                        </td>
                        <td class="text-center">{{fee.createTime}}</td>
                        <td class="text-center">{{fee.cashierName || '-'}}</td>
                        <td class="text-center">{{fee.payableAmount}}/{{fee.receivableAmount}}</td>
                        <td class="text-center">{{fee.receivedAmount}}</td>
                        <td class="text-center">{{fee.withholdAmount || 0}}</td>
                        <td class="text-center">{{fee.preferentialAmount}}/{{fee.deductionAmount}}</td>
                        <td class="text-center">{{fee.giftAmount}}</td>
                        <td class="text-center">{{fee.lateFee}}</td>
                        <td class="text-center">{{fee.builtUpArea}}</td>
                        <td class="text-center">{{fee.psName || '-'}}</td>
                        <td class="text-center textAuto" style="max-width: 200px;">{{fee.remark}}</td>
                    </tr>
                </tbody>
            </table>
            <!-- 分页 -->
            <div class="row">
                <div class="col-md-1 margin-left">
                    <div class="row">
                        <vc:i18n name="小计" namespace="reportPayFeeDetail"></vc:i18n>
                    </div>
                    <div class="row">
                        <vc:i18n name="大计" namespace="reportPayFeeDetail"></vc:i18n>
                    </div>
                </div>
                <div class="col-md-1">
                    <div class="row">
                        <span>
                            <vc:i18n name="应收:" namespace="reportPayFeeDetail"></vc:i18n>
                        </span> {{reportPayFeeDetailInfo.totalReceivableAmount}}
                        <span>
                            <vc:i18n name="元" namespace="reportPayFeeDetail"></vc:i18n>
                        </span>
                    </div>
                    <div class="row">
                        <span>
                            <vc:i18n name="应收:" namespace="reportPayFeeDetail"></vc:i18n>
                        </span>{{reportPayFeeDetailInfo.allReceivableAmount}}
                        <span>
                            <vc:i18n name="元" namespace="reportPayFeeDetail"></vc:i18n>
                        </span>
                    </div>
                </div>
                <div class="col-md-1">
                    <div class="row">
                        <span>
                            <vc:i18n name="实收:" namespace="reportPayFeeDetail"></vc:i18n>
                        </span> {{reportPayFeeDetailInfo.totalReceivedAmount}}
                        <span>
                            <vc:i18n name="元" namespace="reportPayFeeDetail"></vc:i18n>
                        </span>
                    </div>
                    <div class="row">
                        <span>
                            <vc:i18n name="实收:" namespace="reportPayFeeDetail"></vc:i18n>
                        </span> {{reportPayFeeDetailInfo.allReceivedAmount}}
                        <span>
                            <vc:i18n name="元" namespace="reportPayFeeDetail"></vc:i18n>
                        </span>
                    </div>
                </div>
                <div class="col-md-1">
                    <div class="row">
                        <span>
                            <vc:i18n name="优惠:" namespace="reportPayFeeDetail"></vc:i18n>
                        </span> {{reportPayFeeDetailInfo.totalPreferentialAmount}}
                        <span>
                            <vc:i18n name="元" namespace="reportPayFeeDetail"></vc:i18n>
                        </span>
                    </div>
                    <div class="row">
                        <span>
                            <vc:i18n name="优惠:" namespace="reportPayFeeDetail"></vc:i18n>
                        </span> {{reportPayFeeDetailInfo.allPreferentialAmount}}
                        <span>
                            <vc:i18n name="元" namespace="reportPayFeeDetail"></vc:i18n>
                        </span>
                    </div>
                </div>
                <div class="col-md-1">
                    <div class="row">
                        <span>
                            <vc:i18n name="减免:" namespace="reportPayFeeDetail"></vc:i18n>
                        </span> {{reportPayFeeDetailInfo.totalDeductionAmount}}
                        <span>
                            <vc:i18n name="元" namespace="reportPayFeeDetail"></vc:i18n>
                        </span>
                    </div>
                    <div class="row">
                        <span>
                            <vc:i18n name="减免:" namespace="reportPayFeeDetail"></vc:i18n>
                        </span> {{reportPayFeeDetailInfo.allDeductionAmount}}
                        <span>
                            <vc:i18n name="元" namespace="reportPayFeeDetail"></vc:i18n>
                        </span>
                    </div>
                </div>
                <div class="col-md-1">
                    <div class="row">
                        <span>
                            <vc:i18n name="赠送:" namespace="reportPayFeeDetail"></vc:i18n>
                        </span> {{reportPayFeeDetailInfo.totalGiftAmount}}
                        <span>
                            <vc:i18n name="元" namespace="reportPayFeeDetail"></vc:i18n>
                        </span>
                    </div>
                    <div class="row">
                        <span>
                            <vc:i18n name="赠送:" namespace="reportPayFeeDetail"></vc:i18n>
                        </span> {{reportPayFeeDetailInfo.allGiftAmount}}
                        <span>
                            <vc:i18n name="元" namespace="reportPayFeeDetail"></vc:i18n>
                        </span>
                    </div>
                </div>
                <div class="col-md-1">
                    <div class="row">
                        <span>
                            <vc:i18n name="滞纳金:" namespace="reportPayFeeDetail"></vc:i18n>
                        </span> {{reportPayFeeDetailInfo.totalLateFee}}
                        <span>
                            <vc:i18n name="元" namespace="reportPayFeeDetail"></vc:i18n>
                        </span>
                    </div>
                    <div class="row">
                        <span>
                            <vc:i18n name="滞纳金:" namespace="reportPayFeeDetail"></vc:i18n>
                        </span> {{reportPayFeeDetailInfo.allLateFee}}
                        <span>
                            <vc:i18n name="元" namespace="reportPayFeeDetail"></vc:i18n>
                        </span>
                    </div>
                </div>
            </div>
            <div class="row margin-top-xs">
                <div class="col-sm-9">
                    <div>
                        <vc:i18n name="优惠金额：打折规则和打折无欠费规则下产生的优惠金额" namespace="reportFeeDetail"></vc:i18n>
                    </div>
                    <div>
                        <vc:i18n name="减免金额：减免规则下产生的减免金额" namespace="reportFeeDetail"></vc:i18n>
                    </div>
                    <div>
                        <vc:i18n name="赠送金额：赠送规则下赠送月份应缴的金额" namespace="reportFeeDetail"></vc:i18n>
                    </div>
                    <div>
                        <vc:i18n name="滞纳金：违约滞纳金规则下产生的违约金额，需额外缴纳的滞纳金" namespace="reportFeeDetail"></vc:i18n>
                    </div>

                </div>
                <div class="col-md-12 text-center">
                    <vc:create path="frame/pagination"></vc:create>
                </div>
            </div>
        </div>
    </div>
</div>